package com.shijunhao.graduation.service.business;

import com.shijunhao.graduation.domain.entity.BusinessUserGood;
import com.shijunhao.graduation.domain.vo.GoodBadVo;
import com.shijunhao.graduation.service.system.BaseService;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author shijunhao
 * @since 2022-04-24
 */
public interface IBusinessUserGoodService extends BaseService<BusinessUserGood> {
    /**
     * @param nid: 文章id
     * @param tableValue: 所属表值
     * @param isGood: 是否为点赞
     * @return: com.shijunhao.graduation.domain.entity.BusinessUserGood
     * @author: shijunhao
     * @date: 2022/4/24 22:38
     * @description: 查找用户是否在对应表操作过
     */
    BusinessUserGood getOne(Long nid,Integer tableValue,Boolean isGood);
    BusinessUserGood getOneHidden(Long nid,Integer tableValue,Boolean isGood,Boolean isHidden);

    /**
     * @param nid: 文章id
     * @param tableValue: 表属性值
     * @param isGood: 是否为点赞信息
     * @author: shijunhao
     * @date: 2022/4/24 22:50
     * @description: 进行对应操作
     */
    boolean doAction(Long nid,Integer tableValue,boolean isGood);

    /**
     * @param tableValue: 所属表
     * @param nid: 文章id
     * @return: com.shijunhao.graduation.domain.vo.GoodBadVo
     * @author: shijunhao
     * @date: 2022/4/25 16:59
     * @description: 查看当前用户是否在点击了对应文章的赞或踩
     */
    GoodBadVo getGoodBadInfo(Integer tableValue,Long nid);


    /**
     * @param nid: 评论id
     * @param tableValue: 评论表
     * @return: boolean
     * @author: shijunhao
     * @date: 2022/4/25 17:59
     * @description: 评论点赞操作
     */
    boolean discussAction(Long nid,Integer tableValue);
}
